package com.car.loan.project.ve.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.car.loan.project.ve.domain.VeVehicleEvaluation;
import com.car.loan.project.ve.domain.select.VehicleEvaluationBaseSelect;
import com.car.loan.project.ve.domain.vo.VehicleEvaluationBaseVo;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * 车辆评估Mapper接口
 *
 * @author ruoyi
 * @date 2019-10-29
 */
@Repository
public interface VeVehicleEvaluationMapper extends BaseMapper<VeVehicleEvaluation> {

    Page<VehicleEvaluationBaseVo> findVehicleEvaluationBasePage(Page<VehicleEvaluationBaseVo> page,
        @Param("vehicleEvaluationBaseSelect") VehicleEvaluationBaseSelect vehicleEvaluationBaseSelect);

    /**
     * 更据车架号获取当前评估信息
     * @param frameNo
     * @return
     */
    @Select("select * from ve_vehicle_evaluation where status = 10 and  frame_no =#{frameNo}")
    List<VeVehicleEvaluation> findAllByFrameNo(@Param("frameNo") String frameNo);
}
